package com.easy.user.service;

import java.util.List;

import com.easy.bean.Address;
import com.easy.bean.Users;
import com.easy.exception.NoPassException;
import com.easy.exception.NoUserException;

public interface IUserService {

	int deleteAddress(int id);

	Address getAddress(int id);
	int setAddressDefault(int userid,int addressid);
	/**
	 * 登录
	 * @param user
	 * @return
	 */
	String login(Users user)  throws NoPassException, NoUserException;
	/**
	 * 通过ID获取用户信息
	 * @param token
	 * @return
	 */
	Users getUsersByID(Integer id);
	/**
	 * 修改用户信息
	 * @param user
	 * @return
	 */
	Users editUsers(Users user);
	/**
	 * 删除用户
	 * @param id
	 * @return
	 */
	Users deleteUsers(Integer id);
	/**
	 * 修改密码
	 * @param id
	 * @param newpass
	 * @param oldpass
	 * @param confirmpass
	 * @return
	 */
	boolean editpassword(Integer id,String newpass,String oldpass,String confirmpass)throws Exception ;


	int editAvatar(int userid,String avatar);

	List<Address> getAddressList(int userid);
	
	int insertAddress(Address address);
}
